<template>
  <div>
    <tableColumn
      :headerData="headerData"
      :tableData="tableData"
      :isoperation="false"
      :isrowList="isrowList"
    >
    </tableColumn>
  </div>
</template>
<script>
import tableColumn from "@/components/kwNineSuperTable";
export default {
  name: "MultistageHeader",
  data() {
    return {
      // 1）如果出现多级表头那么headerData的每一个对象要加一个id作为唯一标识防止重复创建多级头部
      // 2) 如果有下一级头部那么该头部的所在对象加一个children chilren数组里面放置下一级头部对象
      // 3)isRowList 如果你当前页面需要合并行并且你当前页面时多级表头你就把需要合并的prop以数组形式传入组件 
      // 传入时候必须按照实际页面显示的顺序传入
      isrowList:["city","city1","province","address","name","zip","date"],  
      headerData: [
        {
          prop: "date",
          label: "日期",
          id: "1",
        },
        {
          id: "2",
          label: "配送信息",
          children: [
            {
              prop: "name",
              label: "姓名",
              id: "3",
            },
            {
                id:"5",
                label:"地址",
                children:[
                    {
                    prop: "province",
                    label: "城市",
                     id:"6",
                    },
                    {
                    label: "区",
                     id:"7",
                    children:[
                        {
                            prop: "city",
                            label: "区1",
                            id:"99",
                        },
                         {
                            prop: "city1",
                            label: "区2",
                            id:"91",
                        }
                    ]
                    },
                    {
                    prop: "address",
                    label: "地址",
                    id:"8",
                    }
                ]
            },
            {
              prop: "zip",
              label: "邮箱",
              id:"4"
            },
          ],
        },
      ],
      tableData: [
        {
          date: "2016-05-03",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          city1: "普陀区1",
          address: "上海市普陀区金沙江路 1518 弄",
          zip: 200333,
        },
        {
          date: "2016-05-02",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          city1: "普陀区2",
          address: "上海市普陀区金沙江路 1518 弄",
          zip: 200333,
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          city1: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
          zip: 200333,
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          province: "上海",
          city1: "普陀区4",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
          zip: 200333,
        },
        {
          date: "2016-05-08",
          name: "王小虎",
          province: "上海",
          city1: "普陀区2",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
          zip: 200333,
        },
        {
          date: "2016-05-06",
          name: "王小虎",
          province: "上海",
          city1: "普陀区2",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
          zip: 200333,
        },
        {
          date: "2016-05-07",
          city1: "普陀区2",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
          zip: 200333,
        },
      ],
    };
  },
  methods: {},
  components: {
    tableColumn,
  },
};
</script>